package com.hu.controller;

import com.hu.entity.GetEntryScoreLine;
import com.hu.service.EntryScoreService;
import com.hu.service.UniversityService;
import com.hu.vo.EntryScoreLineVo;
import com.hu.vo.UniversityVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ZhouKai
 * 2022/4/23 20:13
 */
@RestController
public class EntryScoreController {
    @Autowired
    EntryScoreService entryScoreService;
    @Autowired
    UniversityService universityService;

    @RequestMapping("/getEntryScoreLine")
    public EntryScoreLineVo getEntryScoreLineVo(@RequestBody GetEntryScoreLine name) {
        Integer id = universityService.getUniversity(name.getName()).getId();
        return entryScoreService.getEntryScoreLineVo(id);
    }

}
